package com.itheima.controller;

import com.itheima.service.PeachblossomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@RestController
@RequestMapping("/peachblossom")
public class PeachblossomController {

    @Autowired
    private PeachblossomService peachblossomService;

    //发送语音
    @PostMapping
    public ResponseEntity savePeachblossom(MultipartFile PeachblossomThumbnail) throws IOException {
        peachblossomService.savePeachblossom(PeachblossomThumbnail);
        return ResponseEntity.ok(null);
    }

    //接受语音
/*    @GetMapping
    public ResponseEntity*/

}
